package com.cxm.helper.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 点赞状态
 * @author chenximeng
 */
@Getter
@AllArgsConstructor
public enum LikedStatusEnum {
    LIKE(1, "点赞"),
    UNLIKE(0, "取消点赞/未点赞"),
    ;

    private Integer code;

    private String name;

    public static Integer reversCode(Integer code) {
        return code.equals(LikedStatusEnum.LIKE.getCode()) ? LikedStatusEnum.UNLIKE.getCode():LikedStatusEnum.LIKE.getCode();
    }
}
